<?php

namespace Home\Controller;

use Home\Core\CommandSDK;

class VideoController extends BaseController
{

    /**
     * 检索企业列表
     */
    public function video()
    {
        $cookie = base64_decode($_COOKIE['user_info']);
        parse_str($cookie,$userinfo);
        dump($userinfo);
        $param = I('get.');
        $param['resid']=16830721;
//        dump($param);
        $today = strtotime(date("Y-m-d"),time());
        $param['begintime']=$today;
//        $end = $today+60*60*24;
        $todayEnd= date('Y-m-d 23:59:59', time());
//        dump($todayEnd);
//        $param['endtime']=$end;
//        dump($param);
        $param['endtime']=strtotime($todayEnd);
//        $param['endtime']=date("Y-m-d H:i:s",$end);
//        dump($param);
//        $param['accountid']=$userinfo['userid'];
//        $param['restype']=1;
//        $param['parentid']=0;
//        if(empty($param['pageid'])){
//            $param['pageid']=1;
//        }else{
//            $param['pageid']=$param['pageid'];
//        }
//        if(empty($param['pagecount'])){
//            $param['pagecount']=10000000;
//        }else{
//            $param['pagecount']=$param['pagecount'];
//        }
        dump($param);
        $sdk = new CommandSDK();
        $return = $this->http_request($sdk::getFrontEndVideo, $param, 'GET');
        $array = json_decode(json_encode($return), true);
        dump($array);
        $this->assign('array',$array['channels']);
        $this->display();
    }

}